<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>美兰数据文化馆与图书馆</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
</head>
<style>
    /* 重置轮播样式 */
    .layadmin-carousel {
        height: 185px !important;
        background-color: #fff;
    }

    .layadmin-carousel .layui-carousel-ind li {
        background-color: #e2e2e2;
    }

    .layadmin-carousel .layui-carousel-ind li:hover {
        background-color: #c2c2c2;
    }

    .layadmin-carousel .layui-carousel-ind li.layui-this {
        background-color: #999;
    }

    .layadmin-carousel .layui-carousel,
    .layadmin-carousel > *[carousel-item] > * {
        background-color: #fff;
    }

    .layadmin-carousel .layui-col-space10 {
        margin: 0;
    }

    .layadmin-carousel .layui-carousel-ind {
        position: absolute;
        top: -41px;
        text-align: right;
    }

    .layadmin-carousel .layui-carousel-ind ul {
        background: none;
    }

    .layadmin-backlog .layadmin-backlog-body {
        display: block;
        padding: 10px 15px;
        background-color: #f8f8f8;
        color: #999;
        border-radius: 2px;
        transition: all .3s;
        -webkit-transition: all .3s;
    }

    .layadmin-backlog-body h3 {
        padding-bottom: 10px;
        font-size: 12px;
    }

    .layadmin-backlog-body p cite {
        font-style: normal;
        font-size: 30px;
        font-weight: 300;
        color: #009688;
    }

    .layadmin-backlog-body:hover {
        background-color: #f2f2f2;
        color: #888;
    }

    .divhtml {
        line-height: 20px;
        padding: 9px 0px;
        text-align: left;
        position: relative;
        display: block;
        float: left;
        font-weight: 400;
    }

    .layui-form-label {
        width: 180px;
    }

    .layui-input-block {
        margin-left: 210px;
    }
</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" lay-filter="component-form-element">
                <div class="layui-tab-content" style="height: auto">
                    项目基本信息
                    <hr>
                    <div class="layui-row">
                        <div class="layui-col-lg12">
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">项目名称</label>
                                        <div class="layui-input-block">
                                            <input disabled type="text" name="name" lay-verify="name"
                                                   autocomplete="off" placeholder="请输入项目名称"
                                                   class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-col-lg6">
                                    <div class="layui-form-item">
                                        <div class="layui-col-xs12">
                                            <label  class="layui-form-label">项目备注</label>
                                            <div class="layui-input-block">
                                                <input disabled type="text" name="xmbz" lay-verify="xmbz"
                                                       autocomplete="off" placeholder="请输入项目备注"
                                                       class="layui-input">
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-row">
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">项目开工时间</label>
                                    <div class="layui-input-block">
                                        <input  disabled type="text" name="starDateString" id="starDateString" lay-verify="starDate"
                                               autocomplete="off" placeholder="请输入项目开工时间"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">项目完工时间</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="enDateString" id="enDateString" lay-verify="enDate"
                                               autocomplete="off" placeholder="请输入项目完工时间"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">设备投产时间</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="tcDateString" id="tcDateString" lay-verify="tcDate"
                                               autocomplete="off" placeholder="设备投产时间"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">验收时间</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="ysDateString" id="ysDateString" lay-verify="ysDate"
                                               autocomplete="off" placeholder="请选择验收时间"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="layui-row">
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">质检时间</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="zjDateString" id="zjDateString" lay-verify="zjDate"
                                               autocomplete="off" placeholder="请输入项目质检时间"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">出水排放标准</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="cspfbz" lay-verify="cspfbz"
                                               autocomplete="off" placeholder="请输入出水排放标准"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-lg6">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">工艺流程处理</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="gylccl" lay-verify="gylccl"
                                               autocomplete="off" placeholder="请输入工艺流程处理"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
<%--                        <div class="layui-col-lg3">--%>
<%--                            <div class="layui-form-item">--%>
<%--                                <div class="layui-col-xs12">--%>
<%--                                    <label class="layui-form-label">收益人口</label>--%>
<%--                                    <div class="layui-input-block">--%>
<%--                                        <input disabled type="text" name="syrk" lay-verify="syrk"--%>
<%--                                               autocomplete="off" placeholder="请输入收益人口"--%>
<%--                                               class="layui-input">--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </div>--%>
<%--                        </div>--%>

                    </div>


                    <div class="layui-row">
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">排污口</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="pwk" lay-verify="pwk"
                                               autocomplete="off" placeholder="请输入排污口"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">敷设管道长度</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="fsgdcd" lay-verify="fsgdcd"
                                               autocomplete="off" placeholder="请输入敷设管道长度"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">公里</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="gl" lay-verify="gl"
                                               autocomplete="off" placeholder="请输入公里"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-lg3">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">化粪池</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="hfc" lay-verify="hfc"
                                               autocomplete="off" placeholder="请输入化粪池"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="layui-row">
                        <div class="layui-col-lg6">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">尾水排向</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="wspx" lay-verify="wspx"
                                               autocomplete="off" placeholder="尾水排向"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
<%--                        <div class="layui-col-lg3">--%>
<%--                            <div class="layui-form-item">--%>
<%--                                <div class="layui-col-xs12">--%>
<%--                                    <label class="layui-form-label">经度</label>--%>
<%--                                    <div class="layui-input-block">--%>
<%--                                        <input disabled type="text" name="jd" lay-verify="jd"--%>
<%--                                               autocomplete="off" placeholder="请输入经度"--%>
<%--                                               class="layui-input">--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </div>--%>

<%--                        </div>--%>
<%--                        <div class="layui-col-lg3">--%>
<%--                            <div class="layui-form-item">--%>
<%--                                <div class="layui-col-xs12">--%>
<%--                                    <label class="layui-form-label">维度</label>--%>
<%--                                    <div class="layui-input-block">--%>
<%--                                        <input disabled type="text" name="wd" lay-verify="wd"--%>
<%--                                               autocomplete="off" placeholder="请输入维度"--%>
<%--                                               class="layui-input">--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </div>--%>

<%--                        </div>--%>
                        <div class="layui-col-lg6">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">设备运行情况</label>
                                    <div class="layui-input-block">
                                        <select disabled type="text" name="sbyxqk" lay-verify="sbyxqk"
                                                autocomplete="off" placeholder="请输入设备运行情况"
                                                class="layui-input">
                                            <option value="">请选择设备运行情况</option>
                                            <option value="正常运行">正常运行</option>
                                            <option value="调试运行">调试运行</option>
                                            <option value="在建">在建<option>
                                            <option value="未运行">未运行</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-row">
                        <div class="layui-col-lg6">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">设备厂家</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="sbcj" lay-verify="sbcj"
                                               autocomplete="off" placeholder="请输入设备厂家"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg6">
                            <div class="layui-form-item">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label">日处理量(吨)</label>
                                    <div class="layui-input-block">
                                        <input disabled type="text" name="rcll" lay-verify="rcll"
                                               autocomplete="off" placeholder="请输入日处理量"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <input type="hidden" name="zrcids" id="zrcids">
                    </div>
                    <%--                    乡镇信息                --%>
                    乡镇基本信息
                    <hr>
                    <div class="layui-row">
                    <div class="layui-row">
                        <table class="layui-hide" id="xztable" lay-filter="xztable"></table>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script>
    function child(tid){
        layui.use(['form', 'laydate', 'layer'], function () {
            var $ = layui.$
                , form = layui.form
                , laydate = layui.laydate
                , layer = layui.layer;

            var  zrcSelecArr = []
            var zrcId = -1
            var xzTableData=[]

            //小表格
            layui.use(['table','layer'], function(){
                var table = layui.table
                var layer = layui.layer

                //第一个实例
                table.render({
                    elem: '#xztable'
                    ,data: xzTableData //数据接口
                    ,page: false //开启分页
                    ,cols: [[ //表头
                        {field: 'zhen', title: '乡镇'}
                        ,{field: 'cunweihui', title: '村委会'}
                        ,{field: 'name', title: '自然村(小组)'}
                        ,{field: 'hushu', title: '户数', sort: true}
                        // ,{title: '操作', toolbar: '#toolBar-xz', align: "center", width: 250, fixed: "right"}

                    ]]
                    ,id :'xzxzTable'
                    ,data:xzTableData
                });

                // 初始化自然村
                $.ajax({
                    type: "post",
                    url: "<%=request.getContextPath()%>/rest/base/getProXZ",
                    dataType: "json",
                    async: true,
                    data:{
                        'tid':tid,
                    },
                    success:function (msg) {
                        if(msg.list.length>0){
                            for (var i=0;i<msg.list.length;i++){
                                var item = msg.list[i]
                                xzTableData.push(item)
                                zrcSelecArr.push(item.zrcId)
                            }
                            table.reload('xzxzTable',{data:xzTableData})
                        }
                    }
                })
            });

            $.ajax({
                type: "get",
                url: "<%=request.getContextPath()%>/rest/base/getProjectTableByTid",
                dataType: "json",
                async: false,
                data:"tid=" + tid,
                success: function (data) {
                    form.val("component-form-element", data);
                    form.render()
                }
            });

            laydate.render({
                elem: '#starDate' //指定元素
                ,format: 'yyyy-MM-dd'
            });
            laydate.render({
                elem: '#enDate' //指定元素
                ,format: 'yyyy-MM-dd'
            });
            laydate.render({
                elem: '#tcDate' //指定元素
                ,format: 'yyyy-MM-dd'
            });
            laydate.render({
                elem: '#ysDate' //指定元素
                ,format: 'yyyy-MM-dd'
            });
            laydate.render({
                elem: '#zjDate' //指定元素
                ,format: 'yyyy-MM-dd'
            });

        });
    }
</script>
</body>
</html>